//
//  NSString+GSCommonLogin.m
//  GSLoginDemo
//
//  Created by guoshikeji_a on 2018/7/31.
//  Copyright © 2018年 guoshikeji. All rights reserved.
//

#import "NSString+GSCommonLogin.h"

@implementation NSString (GSCommonLogin)

/**
 电话号码隐私处理 返回 199****9898
 */
+ (NSString *)phoneNumberPrivacyFrom:(NSString *)phoneNumber {
    if (phoneNumber.length==11) {
        NSString *prefix = [phoneNumber substringToIndex:3];
        NSString *suffix = [phoneNumber substringFromIndex:7];
        return [NSString stringWithFormat:@"%@****%@",prefix,suffix];
    }
    return phoneNumber;
}

@end
